﻿@model LynxWiki.Models.UserRoles

@{
    ViewBag.Title = "List User Missing Roles";
}

<h2>List User Missing Roles</h2>
<div><p>
    <span>User Name: </span><span>@Model.User</span>
     </p>
</div>

<table class="TableClass">
    <tr>
        <th class="TableCellHighlighted">Role Name</th>
        <th class="TableCellHighlighted">Actions</th>
    </tr>
    @foreach (string role in Model.AppRoles) {
      <tr>
        <td class="TableCell">@role</td>
        <td class="TableCell">
            @using (Html.BeginForm("AddRoleToUser", "UserRoles", FormMethod.Post, new { @class = "frmAddRoleToUser", id = Model.User + "_frmAddRoleToUser" })) {
                @Html.Hidden("UserName", Model.User)
                @Html.Hidden("Role", role)
                <input type="submit" name="btnAddRoleToUser" class="btnAddRoleToUser" value="Add Role To User" />
            }
        </td>
      </tr>
    }
</table>